#ifndef __HERM_BASE_UTILS_STR_UTIL_H__
#define __HERM_BASE_UTILS_STR_UTIL_H__

#include <string>
#include <vector>
#include <sstream>
#include "herm/base/utils/types.h"

namespace herm{

void ReplaceStr(std::string& str, const std::string& oldReplaceStr, const std::string& newReplaceStr);
std::vector<std::string> SplitStr(const std::string& str, const std::string& dec);

template <class Result>
Result StrToInt(const std::string& str)
{
    std::istringstream iss(str);
    Result val;
    iss >> val;
    return val;
}

template <class IntParam>
std::string IntToStr(IntParam val)
{
    std::ostringstream oss;
    oss << val;
    return oss.str();
}
}

#endif
